{% extends "admin/admin_base.html" %}


{% block content %}
<!--更新机器人固件-->

<!-- 恢复ROS固件初始化 -->
<div style='height:30px; color: #8F1930'>
    <div>
        <h2>更新机器人固件</h2>
        <hr>
        <!--    1 -->

        <form action="{{url_for('admin.initialization_ros_firmware')}}" method="POST"
              enctype="multipart/form-data">
            <div style='height:30px'>
                <span style='display:inline-block;margin-right:5px'>恢复ROS固件初始化:</span>
            </div>
            <input type="submit" value="恢复初始化"/>
        </form>
    </div>

    <!-- 上传ROS固件  -->
    <div style='height:30px'>
        <hr>
    </div>
    <div>
        <form action="{{url_for('admin.upload_ros_firmware')}}" method="POST"
              enctype="multipart/form-data">
            <div style='height:30px'>
                <span style='display:inline-block;margin-right:5px'>上传ROS固件:</span>
                <input type="file" name="file" accept=".tar.gz"/>
            </div>
            <br>
            <input type="submit" value="更新"/>
        </form>

    </div>

    <!-- 上传驱动板固件 -->
    <div style='height:30px'>
        <hr>
    </div>
    <div>
        <form action="{{url_for('admin.upload_drive_firmware')}}" method="POST"
              enctype="multipart/form-data">
            <div style='height:30px'>
                <span style='display:inline-block;margin-right:5px'>上传驱动板固件:</span>
                <input type="file" name="file" accept=".tar.gz"/>
            </div>
            <br>
            <input type="submit" value="更新"/>
        </form>
    </div>


    <!-- 重启机器人 -->
    <div style='height:30px'>
        <hr>
    </div>
    <div>
        <form action="{{url_for('admin.restart_robot')}}" method="POST"
              enctype="multipart/form-data">
            <div>
                <span style='display:inline-block;margin-right:5px'>重启机器人</span>
                <p>
                    <input type="radio" value="1" name="mode"/>硬重启
                    <input type="radio" value="2" name="mode"/>软重启
                    <input type="radio" value="3" name="mode"/>重启传感器
                </p>
                <input type="submit" value="确定"/>
            </div>
        </form>
    </div>
    {% endblock %}